<template>
  <el-dialog
    title="手机号所有权验证"
    :visible.sync="visible"
    :close-on-click-modal="false"
    width="80%"
    top="5%"
    @close="$emit('update:visible', false)"
  >
    <phone-verify
      :preferred-sim="preferredSim"
      :sms-number="smsNumber"
      :message-text="messageText"
    />
    <div slot="footer" class="dialog-footer">
      <el-button type="success" @click="help">客 服💁️</el-button>
      <el-button @click="$emit('update:visible', false)">关 闭</el-button>
    </div>
  </el-dialog>
</template>

<script>
import PhoneVerify from './PhoneVerify.vue'

export default {
  name: 'PhoneVerifyDialog',
  components: { PhoneVerify },
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    preferredSim: {
      type: String,
      default: 'xxxx'
    },
    smsNumber: {
      type: String,
      default: '15528052586'
    },
    messageText: {
      type: String,
      default: '手机号验证'
    }
  },
  methods: {
    help() {
      this.$emit('openHelp')
      this.$emit('update:visible', false)
    }
  }
}
</script>

<style scoped>
.dialog-footer {
  text-align: right;
}

::v-deep .el-dialog__body {
  padding: 0px 20px 0 20px;
}
</style>
